<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <link rel="stylesheet" href="./lib/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="./lib/bootstrap-validator/css/bootstrapValidator.min.css">
    <link rel="stylesheet" href="./lib/nprogress/nprogress.css">
    <link rel="stylesheet" href="./css/common.css">
    <link rel="stylesheet" href="./css/user.css">

    <title>首页</title>
</head>

<body>
    <!-- 左侧菜单栏 -->
    <div class="lt_aside">
        <div class="brand">
            <a href="javascript:;">后台管理</a>
        </div>
        <div class="user">
            <img src="./images/default.png" alt="">
            <p>超级管理员</p>
        </div>
        <div class="nav">
            <ul>
                <li><a href="#" class="current"><i class="glyphicon glyphicon-user"></i><span>用户管理</span></a></li>
                <li>
                    <a href="#" class="category"><i class="glyphicon glyphicon-list"></i><span>分类管理</span></a>
                    <div class="child" style="display: none;">
                        <a href="first.html">一级分类</a>
                        <a href="second.html">二级分类</a>
                    </div>
                </li>
                <li><a href="product.html"><i class="glyphicon glyphicon-tags"></i><span>商品管理</span></a></li>
            </ul>
        </div>
    </div>
    <!-- 右侧导航 -->
    <div class="lt_main ">
        <div class="lt_topbar">
            <a href="javascript:;" class="pull-left icon_menu"><i class="glyphicon glyphicon-align-justify"></i></a>
            <a href="javascript:;" class="pull-right icon_logout"><i class="glyphicon glyphicon-log-out"></i></a>
        </div>
        <div class="container-fluid">
            <ol class="breadcrumb">
                <li><a href="index.html">管理系统</a></li>
                <li class="active">首页</li>
            </ol>

            <!-- 内容部分 -->
            <div class="lt_content">
                <table class="table table-bordered table-hover tab">
                    <thead>
                        <tr>
                            <th>序号</th>
                            <th>用户名</th>
                            <th>手机号</th>
                            <th>状态</th>
                            <th>操作</th>
                        </tr>
                    </thead>
                    <tbody class="tb">
                    </tbody>
                </table>
                <!-- 分页器父盒子 -->
                <div class="text-right">
                    <ul id="pagintor"></ul>
                </div>
            </div>
        </div>
    </div>



    <!-- 模态框 -->
    <!-- Button trigger modal -->
    <!-- Modal -->
    <div class="modal fade " id="addModal">
        <div class="modal-dialog modal-sm" role="document">
            <div class="modal-content ">
                <div class="modal-header">
                    <button type="button" class="close " data-dismiss="modal"><span>&times;</span></button>
                    <h4 class="modal-title" id="myModalLabel">温馨提示</h4>
                </div>
                <div class="modal-body">
                    <div style="color: red">你确定要执行此操作吗？</div>
                </div>
                <div class="modal-footer">
                    <button type="button" class="btn btn-default cancelling" data-dismiss="modal">取消</button>
                    <button type="submit" form="form" class="btn btn-primary btn-ok">确定</button>
                </div>
            </div>
        </div>
    </div>




    <script type="text/html" id="userList">
        {{ each rows v i }}
            <tr>     			
                <td>{{ i + 1 + (page - 1) * size}}</td>
                <td>{{v.username}}</td>
                <td>{{v.mobile}}</td>
                <td>{{v.isDelete === 1 ? '正常' : '禁用'}}</td>
                {{if(v.isDelete === 1)}}
                    <td data-id="{{v.id}}"><button class="btn btn-danger btn-up"  data-isDelete="{{v.isDelete - 1}}" data-toggle="modal" data-target="#addModal">禁用</button></td>
                {{else}}
                    <td data-id="{{v.id}}"><button class="btn btn-primary btn-up"  data-isDelete="{{v.isDelete + 1}}" data-toggle="modal" data-target="#addModal">启用</button></td>
                {{/if}}
            </tr>
        {{ /each }}
    </script>


    <script src="./lib/jquery/jquery.min.js"></script>
    <script src="./lib/bootstrap/js/bootstrap.min.js"></script>
    <script src="./lib/bootstrap-validator/js/bootstrapValidator.min.js"></script>
    <script src="./lib/nprogress/nprogress.js"></script>
    <script src="./lib/echarts/echarts.min.js"></script>
    <script src="./lib/artTemplate/template-web.js"></script>
    <script src="./lib/bootstrap-paginator/bootstrap-paginator.min.js"></script>
    <script src="./js/logout.js"></script>
    <script src="./js/common.js"></script>
    <script src="./js/user.js"></script>
</body>

</html>